<?php

namespace App\Http\Controllers\Front;

use App\Http\Controllers\Controller;
use App\Model\Admin\Product;
use Illuminate\Http\Request;

class PanicBuyingController extends Controller
{
    public function index()
    {
    	//最新商品
        $news = Product::where('is_new',1)->limit(9)->latest()->get();
        //精品
        $bests = Product::where('is_best',1)->orderBy('created_at','desc')->limit(12)->get();
        
    	return view('front.panic-buying.index',compact('news','bests'));
    }
}
